package files;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class StringSort {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<String> sl = Arrays.asList("100", "999", "001", "1000");
		Collections.sort(sl);
		System.err.println(sl);
		Collections.sort(sl, new Comparator<String>() {

			@Override
			public int compare(String arg0, String arg1) {
				int a1 = Integer.parseInt(arg0);
				int a2 = Integer.parseInt(arg1);
				return a1 - a2;
			}
		});
		System.err.println(sl);
	}

}
